<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width，initial-scale=1.0">
	<title>搜索结果</title>
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.0/dist/semantic.min.css">
	<link rel="stylesheet" type="text/css" th:href="@{/css/me.css}">
</head>
<body>

    <!--导航-->
	<div th:replace="~{commons/commons::headbar(1)}"></div>
	<a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
		<i class="sidebar icon"></i>
	</a>

    <!--中间内容-->
	<div class="m-container-small m-padded-tb-big">
		<div class="ui container">
			<!--header-->
			<div class="ui top attached segment">
				<div class="ui middle aligned two column grid">
					<div class="column">
						<h3 class="ui teal header">搜索结果</h3>
					</div>
					<div class="right aligned column">
						共 <h2 class="ui orange header m-inline-block m-text-thin" th:text="${page.totalElements}"> 14 </h2> 个
					</div>
				</div>
			</div>

			<div class="ui top attached teal segment">
				<div class="ui padded vertical segment m-padded-tb-large" th:each="blog : ${page.content}">
					<div class="ui middle aligned mobile reversed stackable grid">
						<div class="ui eleven wide column">
							<h3 class="ui header"><a th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="m-black" th:text="${blog.title}">你真的了解什么是财富自由吗？</a></h3>
							<p class="m-text" th:text="|${blog.description}| + '......'">正确做好任何一件事的前提是清晰、正确的理解目标。而事实是，我们很多人很多时候根本没有对目标的正确定义，甚至根本从来就没有想过，只是大家都那么做而已......</p>
							<div class="ui grid">
								<div class="eleven wide column">
									<div class="ui mini horizontal link list">
										<div class="item">
											<img th:src="@{${blog.user.avatar}}" alt="" class="ui avatar image">
											<div class="content">
												<a href="#" class="header" th:text="${blog.user.nickname}">Kechelle</a>
											</div>
										</div>
										<div class="item">
											<i class="calendar icon"></i><span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2020-7-30</span>
										</div>
										<div class="item">
											<i class="eye icon"></i><span th:text="${blog.views}">0</span>
										</div>
									</div>
								</div>
								<div class="right aligned five wide column">
									<a href="#" target="_blank" class="ui teal basic label m-padded-tiny m-text-thin" th:text="${blog.type.name}">认知升级</a>
								</div>
							</div>
						</div>

						<div class="ui five wide column">
							<a th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
								<img th:src="@{${blog.firstPicture}}" alt="" class="ui rounded image">
							</a>
						</div>
					</div>
				</div>
			</div>
			<!--footer-->
			<div class="ui bottom attached segment" th:if="${page.number}>1">
				<div class="ui middle aligned two column grid">
					<div class="column">
						<a th:href="@{/(page=${page.number}-1)}" class="ui mini teal basic button">上一页</a>
					</div>
					<div class="right aligned column">
						<a th:href="@{/(page=${page.number}+1)}" class="ui mini teal basic button">下一页</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<br>
	<br>

    <!--底部-->
	<div th:replace="~{commons/commons::footbar}"></div>


<script th:replace="~{commons/commons::script}"></script>

<script type="text/javascript">
	$('.menu.toggle').click(function(){
		$('.m-item').toggleClass('m-mobile-hide');
	});
</script>

</body>
</html>